package com.myHospital.biz.impl;

import com.myHospital.biz.UserBiz;
import com.myHospital.dao.UserDao;
import com.myHospital.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userBiz")
public class UserBizImpl implements UserBiz {
    @Autowired
    private UserDao userDao;

    
    public List<User> SearchUser(String name, String phone, String site, int startIndex, int pageSize) {
        return userDao.SearchUser(name,phone,site,startIndex,pageSize);
    }

    
    public int register(User user) {
        return userDao.register(user);
    }

    
    public User getById(int id) {
        return userDao.getById(id);
    }

    @Override
    public User login(String name, String password) {
        return userDao.login(name,password);
    }
}
